<template>
  <div :class="$style.root">
    <el-form :inline="true" :model="formQuery" label-position="right" size="mini">
      <el-row>
        <el-col :span="6">
          <el-form-item label="顶级渠道" :label-width="labelWidth">
            <el-select clearable v-model="formQuery.topChannelCode" placeholder="请选择" style="width: 90%" filterable>
              <el-option v-for="item in topChannelList" :key="item.id" :label="item.name" :value="item.id" />
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="处理状态" :label-width="labelWidth">
            <el-select v-model="formQuery.status" placeholder="请选择" style="width: 90%" filterable>
              <el-option v-for="item in statusTypes" :key="item.id" :label="item.name" :value="item.id" />
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="商品编码" :label-width="labelWidth">
            <el-input v-model="formQuery.goodsCode" placeholder="请输入" style="width: 90%" clearable />
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="处方药" :label-width="labelWidth">
            <el-select clearable v-model="formQuery.isCf" placeholder="请选择" style="width: 90%" filterable>
              <el-option label="是" value="Y" />
              <el-option label="否" value="N" />
            </el-select>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="12">
          <el-form-item label="建议原价毛利率" :label-width="labelWidth">
            <el-input-number
              v-model="channelRangeStart"
              controls-position="right"
              :precision="5"
              :step="0.0001"
              style="margin-right: 2%;width: 43%"
              size="mini"
              label="最小值"
              placeholder="请输入"
            />
            <span>~</span>
            <el-input-number
              v-model="channelRangeEnd"
              controls-position="right"
              :precision="5"
              :step="0.0001"
              style="margin-left: 2%;width: 43%"
              size="mini"
              label="最大值"
              placeholder="请输入"
            />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="建议特价毛利率" :label-width="labelWidth">
            <el-input-number
              v-model="activityRangeStart"
              controls-position="right"
              :precision="5"
              :step="0.0001"
              style="margin-right: 2%;width: 43%"
              size="mini"
              label="最小值"
              placeholder="请输入"
            />
            <span>~</span>
            <el-input-number
              v-model="activityRangeEnd"
              controls-position="right"
              :precision="5"
              :step="0.0001"
              style="margin-left: 2%;width: 43%"
              size="mini"
              label="最大值"
              placeholder="请输入"
            />
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="12">
          <el-form-item label="筛选数据" :label-width="labelWidth">
            <el-select clearable v-model="formQuery.orderByFiled" placeholder="请选择" style="width: 60%" filterable>
              <el-option v-for="item in orderByFiledList" :key="item.id" :label="item.name" :value="item.id" />
            </el-select>
            <el-select clearable v-model="formQuery.orderBy" placeholder="请选择" style="width: 30%" filterable>
              <el-option label="从高到低" value="DESC" />
              <el-option label="从低到高" value="ASC" />
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-button @click="onQuery" type="primary" :loading="querying" size="mini">查询</el-button>
          <el-button @click="reset" type="info" size="mini">重置</el-button>
        </el-col>
      </el-row>
    </el-form>
  </div>
</template>

<style lang="scss" module>
@import './index.module.scss';
</style>

<script>
import Index from './index';
export default Index;
</script>
